Integrand size = 19, antiderivative size = 121 \[ \int \sin (e+f x) (a+b \sin (e+f x))^3 \, dx=\frac {3}{8} b \left (4 a^2+b^2\right ) x-\frac {a \left (a^2+4 b^2\right ) \cos (e+f x)}{2 f}-\frac {b \left (2 a^2+3 b^2\right ) \cos (e+f x) \sin (e+f x)}{8 f}-\frac {a \cos (e+f x) (a+b \sin (e+f x))^2}{4 f}-\frac {\cos (e+f x) (a+b \sin (e+f x))^3}{4 f} \]
3/8*b*(4*a^2+b^2)*x-1/2*a*(a^2+4*b^2)*cos(f*x+e)/f-1/8*b*(2*a^2+3*b^2)*cos (f*x+e)*sin(f*x+e)/f-1/4*a*cos(f*x+e)*(a+b*sin(f*x+e))^2/f-1/4*cos(f*x+e)* (a+b*sin(f*x+e))^3/f
Time = 0.45 (sec) , antiderivative size = 100, normalized size of antiderivative = 0.83 \[ \int \sin (e+f x) (a+b \sin (e+f x))^3 \, dx=\frac {-8 a \left (4 a^2+9 b^2\right ) \cos (e+f x)+b \left (48 a^2 e+12 b^2 e+48 a^2 f x+12 b^2 f x+8 a b \cos (3 (e+f x))-8 \left (3 a^2+b^2\right ) \sin (2 (e+f x))+b^2 \sin (4 (e+f x))\right )}{32 f} \]
(-8*a*(4*a^2 + 9*b^2)*Cos[e + f*x] + b*(48*a^2*e + 12*b^2*e + 48*a^2*f*x + 12*b^2*f*x + 8*a*b*Cos[3*(e + f*x)] - 8*(3*a^2 + b^2)*Sin[2*(e + f*x)] + b^2*Sin[4*(e + f*x)]))/(32*f)
Time = 0.43 (sec) , antiderivative size = 129, normalized size of antiderivative = 1.07, number of steps used = 7, number of rules used = 7, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.368, Rules used = {3042, 3232, 27, 3042, 3232, 3042, 3213}
Below are the steps used by Rubi to obtain the solution. The rule number used for the transformation is given above next to the arrow. The rules definitions used are listed below.
\(\displaystyle \int \sin (e+f x) (a+b \sin (e+f x))^3 \, dx\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \int \sin (e+f x) (a+b \sin (e+f x))^3dx\) |
\(\Big \downarrow \) 3232 |
\(\displaystyle \frac {1}{4} \int 3 (b+a \sin (e+f x)) (a+b \sin (e+f x))^2dx-\frac {\cos (e+f x) (a+b \sin (e+f x))^3}{4 f}\) |
\(\Big \downarrow \) 27 |
\(\displaystyle \frac {3}{4} \int (b+a \sin (e+f x)) (a+b \sin (e+f x))^2dx-\frac {\cos (e+f x) (a+b \sin (e+f x))^3}{4 f}\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \frac {3}{4} \int (b+a \sin (e+f x)) (a+b \sin (e+f x))^2dx-\frac {\cos (e+f x) (a+b \sin (e+f x))^3}{4 f}\) |
\(\Big \downarrow \) 3232 |
\(\displaystyle \frac {3}{4} \left (\frac {1}{3} \int (a+b \sin (e+f x)) \left (5 a b+\left (2 a^2+3 b^2\right ) \sin (e+f x)\right )dx-\frac {a \cos (e+f x) (a+b \sin (e+f x))^2}{3 f}\right )-\frac {\cos (e+f x) (a+b \sin (e+f x))^3}{4 f}\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \frac {3}{4} \left (\frac {1}{3} \int (a+b \sin (e+f x)) \left (5 a b+\left (2 a^2+3 b^2\right ) \sin (e+f x)\right )dx-\frac {a \cos (e+f x) (a+b \sin (e+f x))^2}{3 f}\right )-\frac {\cos (e+f x) (a+b \sin (e+f x))^3}{4 f}\) |
\(\Big \downarrow \) 3213 |
\(\displaystyle \frac {3}{4} \left (\frac {1}{3} \left (-\frac {2 a \left (a^2+4 b^2\right ) \cos (e+f x)}{f}-\frac {b \left (2 a^2+3 b^2\right ) \sin (e+f x) \cos (e+f x)}{2 f}+\frac {3}{2} b x \left (4 a^2+b^2\right )\right )-\frac {a \cos (e+f x) (a+b \sin (e+f x))^2}{3 f}\right )-\frac {\cos (e+f x) (a+b \sin (e+f x))^3}{4 f}\) |
-1/4*(Cos[e + f*x]*(a + b*Sin[e + f*x])^3)/f + (3*(-1/3*(a*Cos[e + f*x]*(a + b*Sin[e + f*x])^2)/f + ((3*b*(4*a^2 + b^2)*x)/2 - (2*a*(a^2 + 4*b^2)*Co s[e + f*x])/f - (b*(2*a^2 + 3*b^2)*Cos[e + f*x]*Sin[e + f*x])/(2*f))/3))/4
3.2.68.3.1 Defintions of rubi rules used
Int[(a_)*(Fx_), x_Symbol] :> Simp[a Int[Fx, x], x] /; FreeQ[a, x] && !Ma tchQ[Fx, (b_)*(Gx_) /; FreeQ[b, x]]
Int[((a_) + (b_.)*sin[(e_.) + (f_.)*(x_)])*((c_.) + (d_.)*sin[(e_.) + (f_.) *(x_)]), x_Symbol] :> Simp[(2*a*c + b*d)*(x/2), x] + (-Simp[(b*c + a*d)*(Co s[e + f*x]/f), x] - Simp[b*d*Cos[e + f*x]*(Sin[e + f*x]/(2*f)), x]) /; Free Q[{a, b, c, d, e, f}, x] && NeQ[b*c - a*d, 0]
Int[((a_) + (b_.)*sin[(e_.) + (f_.)*(x_)])^(m_)*((c_.) + (d_.)*sin[(e_.) + (f_.)*(x_)]), x_Symbol] :> Simp[(-d)*Cos[e + f*x]*((a + b*Sin[e + f*x])^m/( f*(m + 1))), x] + Simp[1/(m + 1) Int[(a + b*Sin[e + f*x])^(m - 1)*Simp[b* d*m + a*c*(m + 1) + (a*d*m + b*c*(m + 1))*Sin[e + f*x], x], x], x] /; FreeQ [{a, b, c, d, e, f}, x] && NeQ[b*c - a*d, 0] && NeQ[a^2 - b^2, 0] && GtQ[m, 0] && IntegerQ[2*m]
Time = 1.66 (sec) , antiderivative size = 104, normalized size of antiderivative = 0.86
method | result | size |
derivativedivides | \(\frac {-\cos \left (f x +e \right ) a^{3}+3 a^{2} b \left (-\frac {\sin \left (f x +e \right ) \cos \left (f x +e \right )}{2}+\frac {f x}{2}+\frac {e}{2}\right )-a \,b^{2} \left (2+\sin ^{2}\left (f x +e \right )\right ) \cos \left (f x +e \right )+b^{3} \left (-\frac {\left (\sin ^{3}\left (f x +e \right )+\frac {3 \sin \left (f x +e \right )}{2}\right ) \cos \left (f x +e \right )}{4}+\frac {3 f x}{8}+\frac {3 e}{8}\right )}{f}\) | \(104\) |
default | \(\frac {-\cos \left (f x +e \right ) a^{3}+3 a^{2} b \left (-\frac {\sin \left (f x +e \right ) \cos \left (f x +e \right )}{2}+\frac {f x}{2}+\frac {e}{2}\right )-a \,b^{2} \left (2+\sin ^{2}\left (f x +e \right )\right ) \cos \left (f x +e \right )+b^{3} \left (-\frac {\left (\sin ^{3}\left (f x +e \right )+\frac {3 \sin \left (f x +e \right )}{2}\right ) \cos \left (f x +e \right )}{4}+\frac {3 f x}{8}+\frac {3 e}{8}\right )}{f}\) | \(104\) |
parts | \(\frac {b^{3} \left (-\frac {\left (\sin ^{3}\left (f x +e \right )+\frac {3 \sin \left (f x +e \right )}{2}\right ) \cos \left (f x +e \right )}{4}+\frac {3 f x}{8}+\frac {3 e}{8}\right )}{f}-\frac {a^{3} \cos \left (f x +e \right )}{f}-\frac {a \,b^{2} \left (2+\sin ^{2}\left (f x +e \right )\right ) \cos \left (f x +e \right )}{f}+\frac {3 a^{2} b \left (-\frac {\sin \left (f x +e \right ) \cos \left (f x +e \right )}{2}+\frac {f x}{2}+\frac {e}{2}\right )}{f}\) | \(112\) |
parallelrisch | \(\frac {48 a^{2} b f x +12 b^{3} f x -32 \cos \left (f x +e \right ) a^{3}-72 \cos \left (f x +e \right ) a \,b^{2}+\sin \left (4 f x +4 e \right ) b^{3}+8 \cos \left (3 f x +3 e \right ) a \,b^{2}-24 \sin \left (2 f x +2 e \right ) a^{2} b -8 \sin \left (2 f x +2 e \right ) b^{3}-32 a^{3}-64 a \,b^{2}}{32 f}\) | \(113\) |
risch | \(\frac {3 a^{2} b x}{2}+\frac {3 b^{3} x}{8}-\frac {a^{3} \cos \left (f x +e \right )}{f}-\frac {9 a \,b^{2} \cos \left (f x +e \right )}{4 f}+\frac {b^{3} \sin \left (4 f x +4 e \right )}{32 f}+\frac {\cos \left (3 f x +3 e \right ) a \,b^{2}}{4 f}-\frac {3 b \sin \left (2 f x +2 e \right ) a^{2}}{4 f}-\frac {b^{3} \sin \left (2 f x +2 e \right )}{4 f}\) | \(114\) |
norman | \(\frac {\frac {\left (2 a^{3}+4 a \,b^{2}\right ) \left (\tan ^{8}\left (\frac {f x}{2}+\frac {e}{2}\right )\right )}{f}+\frac {3 b \left (4 a^{2}+b^{2}\right ) x}{8}+\frac {2 a^{3} \left (\tan ^{2}\left (\frac {f x}{2}+\frac {e}{2}\right )\right )}{f}+\frac {6 \left (a^{3}+2 a \,b^{2}\right ) \left (\tan ^{4}\left (\frac {f x}{2}+\frac {e}{2}\right )\right )}{f}+\frac {2 \left (3 a^{3}+8 a \,b^{2}\right ) \left (\tan ^{6}\left (\frac {f x}{2}+\frac {e}{2}\right )\right )}{f}-\frac {3 b \left (4 a^{2}+b^{2}\right ) \tan \left (\frac {f x}{2}+\frac {e}{2}\right )}{4 f}+\frac {3 b \left (4 a^{2}+b^{2}\right ) \left (\tan ^{7}\left (\frac {f x}{2}+\frac {e}{2}\right )\right )}{4 f}+\frac {3 b \left (4 a^{2}+b^{2}\right ) x \left (\tan ^{2}\left (\frac {f x}{2}+\frac {e}{2}\right )\right )}{2}+\frac {9 b \left (4 a^{2}+b^{2}\right ) x \left (\tan ^{4}\left (\frac {f x}{2}+\frac {e}{2}\right )\right )}{4}+\frac {3 b \left (4 a^{2}+b^{2}\right ) x \left (\tan ^{6}\left (\frac {f x}{2}+\frac {e}{2}\right )\right )}{2}+\frac {3 b \left (4 a^{2}+b^{2}\right ) x \left (\tan ^{8}\left (\frac {f x}{2}+\frac {e}{2}\right )\right )}{8}-\frac {b \left (12 a^{2}+11 b^{2}\right ) \left (\tan ^{3}\left (\frac {f x}{2}+\frac {e}{2}\right )\right )}{4 f}+\frac {b \left (12 a^{2}+11 b^{2}\right ) \left (\tan ^{5}\left (\frac {f x}{2}+\frac {e}{2}\right )\right )}{4 f}}{\left (1+\tan ^{2}\left (\frac {f x}{2}+\frac {e}{2}\right )\right )^{4}}\) | \(333\) |
1/f*(-cos(f*x+e)*a^3+3*a^2*b*(-1/2*sin(f*x+e)*cos(f*x+e)+1/2*f*x+1/2*e)-a* b^2*(2+sin(f*x+e)^2)*cos(f*x+e)+b^3*(-1/4*(sin(f*x+e)^3+3/2*sin(f*x+e))*co s(f*x+e)+3/8*f*x+3/8*e))
Time = 0.28 (sec) , antiderivative size = 93, normalized size of antiderivative = 0.77 \[ \int \sin (e+f x) (a+b \sin (e+f x))^3 \, dx=\frac {8 \, a b^{2} \cos \left (f x + e\right )^{3} + 3 \, {\left (4 \, a^{2} b + b^{3}\right )} f x - 8 \, {\left (a^{3} + 3 \, a b^{2}\right )} \cos \left (f x + e\right ) + {\left (2 \, b^{3} \cos \left (f x + e\right )^{3} - {\left (12 \, a^{2} b + 5 \, b^{3}\right )} \cos \left (f x + e\right )\right )} \sin \left (f x + e\right )}{8 \, f} \]
1/8*(8*a*b^2*cos(f*x + e)^3 + 3*(4*a^2*b + b^3)*f*x - 8*(a^3 + 3*a*b^2)*co s(f*x + e) + (2*b^3*cos(f*x + e)^3 - (12*a^2*b + 5*b^3)*cos(f*x + e))*sin( f*x + e))/f
Leaf count of result is larger than twice the leaf count of optimal. 233 vs. \(2 (109) = 218\).
Time = 0.18 (sec) , antiderivative size = 233, normalized size of antiderivative = 1.93 \[ \int \sin (e+f x) (a+b \sin (e+f x))^3 \, dx=\begin {cases} - \frac {a^{3} \cos {\left (e + f x \right )}}{f} + \frac {3 a^{2} b x \sin ^{2}{\left (e + f x \right )}}{2} + \frac {3 a^{2} b x \cos ^{2}{\left (e + f x \right )}}{2} - \frac {3 a^{2} b \sin {\left (e + f x \right )} \cos {\left (e + f x \right )}}{2 f} - \frac {3 a b^{2} \sin ^{2}{\left (e + f x \right )} \cos {\left (e + f x \right )}}{f} - \frac {2 a b^{2} \cos ^{3}{\left (e + f x \right )}}{f} + \frac {3 b^{3} x \sin ^{4}{\left (e + f x \right )}}{8} + \frac {3 b^{3} x \sin ^{2}{\left (e + f x \right )} \cos ^{2}{\left (e + f x \right )}}{4} + \frac {3 b^{3} x \cos ^{4}{\left (e + f x \right )}}{8} - \frac {5 b^{3} \sin ^{3}{\left (e + f x \right )} \cos {\left (e + f x \right )}}{8 f} - \frac {3 b^{3} \sin {\left (e + f x \right )} \cos ^{3}{\left (e + f x \right )}}{8 f} & \text {for}\: f \neq 0 \\x \left (a + b \sin {\left (e \right )}\right )^{3} \sin {\left (e \right )} & \text {otherwise} \end {cases} \]
Piecewise((-a**3*cos(e + f*x)/f + 3*a**2*b*x*sin(e + f*x)**2/2 + 3*a**2*b* x*cos(e + f*x)**2/2 - 3*a**2*b*sin(e + f*x)*cos(e + f*x)/(2*f) - 3*a*b**2* sin(e + f*x)**2*cos(e + f*x)/f - 2*a*b**2*cos(e + f*x)**3/f + 3*b**3*x*sin (e + f*x)**4/8 + 3*b**3*x*sin(e + f*x)**2*cos(e + f*x)**2/4 + 3*b**3*x*cos (e + f*x)**4/8 - 5*b**3*sin(e + f*x)**3*cos(e + f*x)/(8*f) - 3*b**3*sin(e + f*x)*cos(e + f*x)**3/(8*f), Ne(f, 0)), (x*(a + b*sin(e))**3*sin(e), True ))
Time = 0.23 (sec) , antiderivative size = 97, normalized size of antiderivative = 0.80 \[ \int \sin (e+f x) (a+b \sin (e+f x))^3 \, dx=\frac {24 \, {\left (2 \, f x + 2 \, e - \sin \left (2 \, f x + 2 \, e\right )\right )} a^{2} b + 32 \, {\left (\cos \left (f x + e\right )^{3} - 3 \, \cos \left (f x + e\right )\right )} a b^{2} + {\left (12 \, f x + 12 \, e + \sin \left (4 \, f x + 4 \, e\right ) - 8 \, \sin \left (2 \, f x + 2 \, e\right )\right )} b^{3} - 32 \, a^{3} \cos \left (f x + e\right )}{32 \, f} \]
1/32*(24*(2*f*x + 2*e - sin(2*f*x + 2*e))*a^2*b + 32*(cos(f*x + e)^3 - 3*c os(f*x + e))*a*b^2 + (12*f*x + 12*e + sin(4*f*x + 4*e) - 8*sin(2*f*x + 2*e ))*b^3 - 32*a^3*cos(f*x + e))/f
Time = 0.29 (sec) , antiderivative size = 96, normalized size of antiderivative = 0.79 \[ \int \sin (e+f x) (a+b \sin (e+f x))^3 \, dx=\frac {a b^{2} \cos \left (3 \, f x + 3 \, e\right )}{4 \, f} + \frac {b^{3} \sin \left (4 \, f x + 4 \, e\right )}{32 \, f} + \frac {3}{8} \, {\left (4 \, a^{2} b + b^{3}\right )} x - \frac {{\left (4 \, a^{3} + 9 \, a b^{2}\right )} \cos \left (f x + e\right )}{4 \, f} - \frac {{\left (3 \, a^{2} b + b^{3}\right )} \sin \left (2 \, f x + 2 \, e\right )}{4 \, f} \]
1/4*a*b^2*cos(3*f*x + 3*e)/f + 1/32*b^3*sin(4*f*x + 4*e)/f + 3/8*(4*a^2*b + b^3)*x - 1/4*(4*a^3 + 9*a*b^2)*cos(f*x + e)/f - 1/4*(3*a^2*b + b^3)*sin( 2*f*x + 2*e)/f
Time = 7.72 (sec) , antiderivative size = 313, normalized size of antiderivative = 2.59 \[ \int \sin (e+f x) (a+b \sin (e+f x))^3 \, dx=\frac {3\,b\,\mathrm {atan}\left (\frac {3\,b\,\mathrm {tan}\left (\frac {e}{2}+\frac {f\,x}{2}\right )\,\left (4\,a^2+b^2\right )}{4\,\left (3\,a^2\,b+\frac {3\,b^3}{4}\right )}\right )\,\left (4\,a^2+b^2\right )}{4\,f}-\frac {\mathrm {tan}\left (\frac {e}{2}+\frac {f\,x}{2}\right )\,\left (3\,a^2\,b+\frac {3\,b^3}{4}\right )+2\,a^3\,{\mathrm {tan}\left (\frac {e}{2}+\frac {f\,x}{2}\right )}^6+4\,a\,b^2+{\mathrm {tan}\left (\frac {e}{2}+\frac {f\,x}{2}\right )}^4\,\left (6\,a^3+12\,a\,b^2\right )+{\mathrm {tan}\left (\frac {e}{2}+\frac {f\,x}{2}\right )}^2\,\left (6\,a^3+16\,a\,b^2\right )-{\mathrm {tan}\left (\frac {e}{2}+\frac {f\,x}{2}\right )}^7\,\left (3\,a^2\,b+\frac {3\,b^3}{4}\right )+{\mathrm {tan}\left (\frac {e}{2}+\frac {f\,x}{2}\right )}^3\,\left (3\,a^2\,b+\frac {11\,b^3}{4}\right )-{\mathrm {tan}\left (\frac {e}{2}+\frac {f\,x}{2}\right )}^5\,\left (3\,a^2\,b+\frac {11\,b^3}{4}\right )+2\,a^3}{f\,\left ({\mathrm {tan}\left (\frac {e}{2}+\frac {f\,x}{2}\right )}^8+4\,{\mathrm {tan}\left (\frac {e}{2}+\frac {f\,x}{2}\right )}^6+6\,{\mathrm {tan}\left (\frac {e}{2}+\frac {f\,x}{2}\right )}^4+4\,{\mathrm {tan}\left (\frac {e}{2}+\frac {f\,x}{2}\right )}^2+1\right )}-\frac {3\,b\,\left (4\,a^2+b^2\right )\,\left (\mathrm {atan}\left (\mathrm {tan}\left (\frac {e}{2}+\frac {f\,x}{2}\right )\right )-\frac {f\,x}{2}\right )}{4\,f} \]
(3*b*atan((3*b*tan(e/2 + (f*x)/2)*(4*a^2 + b^2))/(4*(3*a^2*b + (3*b^3)/4)) )*(4*a^2 + b^2))/(4*f) - (tan(e/2 + (f*x)/2)*(3*a^2*b + (3*b^3)/4) + 2*a^3 *tan(e/2 + (f*x)/2)^6 + 4*a*b^2 + tan(e/2 + (f*x)/2)^4*(12*a*b^2 + 6*a^3) + tan(e/2 + (f*x)/2)^2*(16*a*b^2 + 6*a^3) - tan(e/2 + (f*x)/2)^7*(3*a^2*b + (3*b^3)/4) + tan(e/2 + (f*x)/2)^3*(3*a^2*b + (11*b^3)/4) - tan(e/2 + (f* x)/2)^5*(3*a^2*b + (11*b^3)/4) + 2*a^3)/(f*(4*tan(e/2 + (f*x)/2)^2 + 6*tan (e/2 + (f*x)/2)^4 + 4*tan(e/2 + (f*x)/2)^6 + tan(e/2 + (f*x)/2)^8 + 1)) - (3*b*(4*a^2 + b^2)*(atan(tan(e/2 + (f*x)/2)) - (f*x)/2))/(4*f)